The present invention relates to a system wherein computers have replicas of shared data and maintain replica content consistency by interchanging data modifications, more particularly to the order control of the replica updating. A conventional data sharing system uses the following method to determine the order of the updating of a replica.
In many cases, a data sharing system, in which it is assumed that computers are constantly connected by communication lines, includes a mechanism for issuing a notification each time data are updated. In this case, it is ensured that each time data are modified the order of replica updating will correspond to the sequential order of the data modifications. Such a sequential process is hereinafter referred to as the FIFO order. However, there are cases where portable terminals at remote, outside of the office, are used to read out, browse and/or edit data in computers installed in offices; and as the communication quality provided by the wireless public networks that are used for such portable terminals is lower than is that provided by normal LANs (Local Area Networks), there are frequent packet transmission failures. Then, generally, as the restrictions imposed on the data transferring order become stricter, this is accompanied by a corresponding increase in the costs for a transfer. The FIFO order transmission with the strictest restrictions takes the large overhead. Since using a wireless public network is in itself expensive, this transfer overhead constitutes a serious problem.
In a data sharing system, such as Lotus Notes (a trademark of Lotus Development Corp.), for which it is assumed that operations are also performed during the disconnection of the communication lines, a one-time processing, similar to a batch processing, is used, to update the replica. With this system, data can not be accessed during updating. In addition, when the updating of the replica is interrupted by the disconnection of the communication line, the order in which the updating process was performed is generally indefinite. That is, it is unknown to which data has been updated. EP0794646 (Japanese Published Unexamined Patent Application No. Hei 9-24642) discloses a data management system for managing copies of shared data file, which are maintained in a plurality of computer systems connectable via a mobile communication network. The data management system comprises: logging means for storing records of modifications that are correlated with each copy of the shared data file and that are executed for these copies; extraction means for extracting, via a connection to the mobile communication network, the records stored for the other copies of the shared data file; merging means for merging the extracted records to generate the order of the modifications; conflict resolving means for resolving conflicts in the order of the modification by applying a rule defined in advance to the modification order; and means for modifying the copies of the shared file in accordance with the modification order in which conflicts are resolved. In this case, it is considered that the conflict means there are a plurality of data modifications which are performed in parallel for data in the same shared file edition. In addition, it is considered that the resolution of the conflict means that a plurality of data modifications in conflict are rearranged in a specific order. The data management system is provided to merely resolve the modification conflicts. In order to resolve the conflict, data concerning all the modifications must be prepared by the time a determination as to whether a conflict has occurred. That is, a copy of the shared data file can not be modified unless the modification conflict has been resolved. Therefore, if even one set of data concerning a modification is missing, the modification process can not be performed. In addition, the load imposed on the memory capacity is increased to store the modification related data that is received. This constitutes an immense problem for a portable terminal that has only a small memory capacity available for communication. Further, another problem arises if data must be re-transmitted because of a memory capacity shortage.
As described above, conventionally, during the updating of a replica problems arise concerning communication efficiency, the amount of required memory, and the process when the disconnection of a communication line happens during the data transmission.
It is, therefore, one object of the present invention to provide a method and an apparatus for improving communication efficiency during the updating of a replica.
To achieve the above objects, the present invention is a computer for maintaining consistency of replica contents by interchanging data modification with another computer. The computer includes: a replica including shared data; a receiver for receiving, from another computer, a modification request for data included in the replica; and a controller for controlling, regardless of a receiving order of the modification request, for each receipt of the modification request, a timing of update execution for the replica in accordance with the received modification request by using information included in the modification request. The timing of replica updating in accordance with the received modification requests can be determined, regardless of the order in which the modification requests are received, that is, the order of the transmission from other computers. Therefore, communication efficiency can be improved and the amount of required memory can be reduced.
The information included in the modification requests includes: a designation indicating no restriction for a modification order (Ordinary in the preferred embodiment);
a first designation indicating that after all modification requests preceding a current modification request have been effected for the replica, the replica is to be updated in accordance with the current modification request (Forward Flush in the embodiment); a second designation indicating that modification requests following a current modification request are to be effected for the replica after the replica has been updated in accordance with the current modification request (Backward Flush in the embodiment); or a third designation indicating that after all the modification requests preceding a current modification request have been effected for the replica, the replica is to be updated in accordance with the current modification request, and that all modification requests following the current modification request are to be effected for the replica after the replica has been updated in accordance with the current modification request (Two Way Flush). In this manner, the order of replica updating can be explicitly designated.
The information included in the modification request may further include: the number (a first number: BT value in the preferred embodiment) of modification requests that have been generated and that include the second or third designation; and the number (a second number: SBT value in the preferred embodiment) of modification requests that have been generated following the last modification request including the second or third designation. Then, a mechanism can be provided that, even if a communication line has been disconnected before the completion of the updating, can confirm to which modification requests have been received and used to update the replica.
The controller may store first and second management values (the values of BT and SBT in a process in the preferred embodiment) that respectively correspond to the first and second numbers and that define a timing of update execution for the replica. Therefore, the timing of the replica updating can be determined more easily.
If the replica is updated in accordance with the modification request, the controller may store, as third and fourth numbers (the values of response BT and SBT), the first and second numbers included in the modification request. The computer may further comprise a transmitter for transmitting to another computer a modification request for data in the replica and the controller may make the third and fourth numbers to be included in the modification request. As a result, even if a communication line is disconnected, the transmission source can determine which modification request is to be re-transmitted, and also which modification request is to be discarded.
The configuration of a computer on the receiving side has been explained. A computer on the transmission side includes: a replica including shared data; means for instructing modification of data included in the replica, and for designating information concerning a modification order to the modification of data; means for generating a modification request which corresponds to an instruction of the modification of data and which includes information concerning the modification order; and a transmitter for transmitting the modification request in such a manner that it is not confirmed that a generation order and a transmitting order of the modification request are identical. As described above, information concerning the modification order is clearly designated for each data modification, and is included in a modification request so that the receiving side can use that information. In addition, in order to improve communication efficiency, this information is transmitted in a manner that it is not confirmed that the generation order and the transmitting order of the modification request are identical. This manner includes a case where a communication line is disconnected and the re-connection of the line and the re-transmission of information are performed.
The modification request can include the same information as included in the previously described modification request.
The computer further may comprise a receiver for receiving from another computer a modification request for data included in the replica and the received modification request may include response information (the values of response BT and response SBT in the preferred embodiment) indicating that the replica has been updated by a destination computer in accordance with the transmitted modification request. Thus, a modification request is ensured that does not need to be re-transmitted. That is, the computer further comprises means for referring to the response information to determine whether the modification request that has been transmitted is to be deleted.
A single computer can include the elements of both the transmission side and the receiving side, and such computers may be used to constitute a data sharing system.
The configuration of a computer has been explained, and the processing to be performed by the computer can be provided as a program. This program can be stored on a floppy disk or a CD-ROM, or in another storage device.